package dhadi.use.swing;

import java.awt.Graphics;

public class EdgeUi
{
	final private int thinkness = 7;
	final public NodeUi a;
	final public NodeUi b;
	
	public EdgeUi(NodeUi a, NodeUi b)
	{
		this.a = a;
		this.b = b;
	}
	
	public void draw(Graphics g) {
		for (int i = 0-this.thinkness/2; i < this.thinkness/2; i++)
			g.drawLine(this.a.getLocation().x+i,this.a.getLocation().y+i,
					this.b.getLocation().x+i,this.b.getLocation().y+i);
	}

	public String toString() {
		return "Edge [a=" + a + ", b=" + b + "]";
	}
}